package com.songlanyun.modules.protocolconfig.controller.api;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.songlanyun.common.utils.R;
import com.songlanyun.modules.protocolconfig.service.ProtocolConfigService;
import com.songlanyun.modules.user.controller.AbstractController;

// import org.apache.shiro.authz.annotation.RequiresPermissions;

/**
 * 协议管理
 *
 * @author lijiahe 2022-08-05
 */
@RestController
@RequestMapping("api/protocolConfig")
public class ProtocolConfigApiController extends AbstractController {

    @Autowired
    private ProtocolConfigService protocolConfigService;

    @GetMapping("/info/{markCode}")
    // @RequiresPermissions("protocol:config:info")
    public R info(@PathVariable("markCode") String markCode) {
        return R.ok().put("data", protocolConfigService.loadProtocolConfigByMarkCode(markCode, false));
    }

}
